package com.example.naverbooksearch;

import android.content.Context;
import android.os.Handler;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.TextView;

public class ItemView extends FrameLayout {

	URLImageView urlImageView;
	TextView titleTextView;
	TextView authorTextView;
	
	NaverBookItem item;
	Handler mHandler = new Handler();
	ImageRequest mRequest;
	
	
	
	public ItemView(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
		
		LayoutInflater inflater = LayoutInflater.from(context);
		inflater.inflate(R.layout.item_layout, this);
		urlImageView = (URLImageView) findViewById(R.id.imageView);
		titleTextView = (TextView) findViewById(R.id.titleTextView);
		authorTextView = (TextView) findViewById(R.id.authourTextView);
	}
	
	public void setItemData(NaverBookItem item) {
		this.item = item;
		titleTextView.setText(item.title);
		authorTextView.setText(item.author);
		urlImageView.setImageURL(item.image);
	}

	
}
